#import "FlutterRtmpLivePlugin.h"
#import "PushViewFactory.h"
#import "PlayerViewFactory.h"

@implementation FlutterRtmpLivePlugin

+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
    [registrar registerViewFactory:[[PushViewFactory alloc] initWithMessenger:registrar.messenger] withId:@"plugins.com.honggv/RtmpPush"];
    [registrar registerViewFactory:[[PlayerViewFactory alloc] initWithMessenger:registrar.messenger] withId:@"plugins.com.honggv/RtmpPlay"];
}

- (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
  if ([@"getPlatformVersion" isEqualToString:call.method]) {
    result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]);
  } else {
    result(FlutterMethodNotImplemented);
  }
}

@end
